package cloud.health.common.file.domain;

import io.netty.channel.ChannelHandlerContext;
import lombok.Data;
import org.springframework.stereotype.Component;

import java.io.Serializable;

@Data
@Component
public abstract class AbstractFile implements Serializable {

    private String path;

    private Long size;

    public abstract void writeAndFlush(Request request);

    public abstract boolean isSuccess();

    public abstract String error();

    public abstract void download(ChannelHandlerContext context);

    public abstract void close();
}
